package com.quarters.service;

import com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.quarters.bean.ArticleOrder;
import com.quarters.bean.NoticeOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import com.quarters.bean.layuiBean.ResultPage;
import com.quarters.bean.layuiBean.VoPage;
import me.chanjar.weixin.common.error.WxErrorException;

import java.util.List;

/**
 * <p>
 * 通知订单表 服务类
 * </p>
 *
 * @author 冯政尚
 * @since 2019-09-11
 */
public interface NoticeOrderService extends IService<NoticeOrder> {


    /**
     * @param voPage
     * @return 后台查询
     */
    ResultPage<NoticeOrder> selectMyPage(VoPage voPage, Long userId);
    ResultPage<NoticeOrder> selectMyPageAll(VoPage voPage);

    /**
     * @param userId
     * @param time
     * @return 根据当前用户今天发送多少次群发
     */
    List<NoticeOrder> selectByIdTime(Long userId, String time);

    /**
     * 支付
     */
    WxPayMpOrderResult successPay(NoticeOrder noticeOrder) throws WxErrorException, WxPayException;

    /**
     * 回调
     * @param myOrderId
     * @param wxOrderId
     * @param totalFee
     */
    void paySuccess(String myOrderId, String wxOrderId, String totalFee)  ;


    /**
     * @param voPage
     * @return 订单询
     */
    ResultPage<NoticeOrder> selectOrderAll(VoPage voPage,String time);
    ResultPage<NoticeOrder> selectOrder(VoPage voPage,Long userId,String time );


    //标签管理员查询订单
    ResultPage<NoticeOrder> selectLableOrder(VoPage voPage,Long userId,String time);
}
